package com.study.juc;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class FutureTaskTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {


        FutureTask<String> futureTask = new FutureTask<String>(()->{
            
            System.out.println("你好");
            return null;
        });

        
        new Thread(futureTask).start();

//        String s = futureTask.get();
//        System.out.println(s);

    }
}
